package com.yaodian100.crm.activities.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.yaodian100.core.form.entity.Attribute;

/**
 * @author yanling.wu
 */
@Entity
@Table(name = "crm_mgm_value")
public class MgmValue implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Attribute attribute;
	private String id;
	private String value;
	private String name;
	private Mgm mgm;

	// private Date createDate;

	// /**
	// * @return the createDT
	// */
	// @Column(updatable = false)
	// @Temporal(TemporalType.TIMESTAMP)
	// public Date getCreateDate() {
	// return createDate;
	// }
	//
	// /**
	// * @param createDT the createDT to set
	// */
	// public void setCreateDate(Date createDT) {
	// this.createDate = createDT;
	// }

	/**
	 * @return the name
	 */
	@Column(name = "name", length = 100)
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the value
	 */
	@Column(length = 4000)
	public String getValue() {
		return value;
	}

	/**
	 * @param value the value to set
	 */
	public void setValue(String value) {
		this.value = value;
	}

	/**
	 * @return the activities
	 */

	@ManyToOne
	public Mgm getMgm() {
		return mgm;
	}

	/**
	 * @param activities the activities to set
	 */
	public void setMgm(Mgm mgm) {
		this.mgm = mgm;
	}

	/**
	 * @return the attribute
	 */
	@ManyToOne
	public Attribute getAttribute() {
		return attribute;
	}

	/**
	 * @param attribute the attribute to set
	 */
	public void setAttribute(Attribute attribute) {
		this.attribute = attribute;
	}

	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(length = 32)
	public String getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}

}
